The process of emulating the functionality of a first computer platform (the “target system”) on a second computer platform (the “host system”) so that the host system can execute programs designed for the target system is known as “emulation.” Emulation has commonly been achieved by creating software that converts program instructions designed for the target platform (target code instructions) into the native-language of a host platform (host instructions), thus achieving compatibility. More recently, emulation has also been realized through the creation of “virtual machines,” in which the target platform's physical architecture—the design of the hardware itself—is replicated via a virtual model in software.
Two main types of emulation strategies currently are available in the emulation field. The first strategy is known as “interpretation”, in which each target code instruction is decoded in turn as it is addressed, causing a small sequence of host instructions then to be executed that are semantically equivalent to the target code instruction. The main component of such an emulator is typically a software interpreter that converts each instruction of any program in the target machine language into a set of instructions in the host machine language, where the host machine language is the code language of the host computer on which the emulator is being used. In some instances, interpreters have been implemented in computer hardware or firmware, thereby enabling relatively fast execution of the emulated programs.
The other main emulation strategy is known as “translation”, in which the target instructions are analyzed and decoded. This is also referred to as “recompilation” or “cross-compilation”. It is well known that the execution speed of computer programs is often dramatically reduced by interpreters. It is not uncommon for a computer program to run ten to twenty times slower when it is executed via emulation than when the equivalent program is recompiled into target machine code and the target code version is executed. Due to the well known slowness of software emulation, a number of products have successfully improved on the speed of executing source applications by translating portions of the target program at run time into host machine code, and then executing the recompiled program portions. While the translation process may take, e.g., 50 to 100 machine or clock cycles per instruction of the target code, the greater speed of the resulting host machine code is, on average, enough to improve the overall speed of execution of most source applications.
Emulation, whether by interpretation or translation or some combination of both often requires a software simulation of various components of a target system on a host system. It is frequently the case that the target and host systems are based on different types of processor architectures. For example the target device may be a game console, such as the Sony PlayStation®2. PlayStation is a registered trademark of Sony Computer Entertainment Corporation of Tokyo, Japan. This particular device is built around a main processor engine referred to as an Emotion Engine (EE), which is based on a 128-bit central processor unit (CPU) core. The number of registers in the CPU and the size of each (number of bits) are important factors in determining the power and speed of a CPU. For example, the CPU core in the EE uses 128-bit registers. With 128-bit registers, each CPU instruction can manipulate 128 bits of data.
The EE may be emulated by a host system having different processor architecture with different-sized registers. If the host system is based on larger sized registers, this is not a problem as it is relatively straightforward to emulate 128-bit registers with a processor having larger-sized registers. However, if the PlayStation®2 is emulated by a cell-processor based host system (such as the PlayStation®3), a problem arises. The cell processors are a type of parallel processor. The basic configuration of a cell processor includes a “Power Processor Element” (“PPE”)(sometimes called “Processing Element”, or “PE”), and multiple “Synergistic Processing Elements” (“SPE”). The PPEs and SPEs are linked together by an internal high speed bus dubbed “Element Interconnect Bus” (“EIB”). Cell processors are designed to be scalable for use in applications ranging from the hand held devices to main frame computers. The PPE is the main processor for emulation the PS2 EE. Unfortunately, the PPE uses 64-bit registers, which are smaller than the 128-bit EE CPU registers.
Thus, there is a need in the art, for emulating a target system on a host system having smaller sized registers than the target system.